#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author Jmz


class Mymeta(type):
    def __init__(self,name,bases,dict):
        if not name.istitle():
            raise TypeError('类名%s首字母必须大写'%name)

        if not self.__doc__ or not self.__doc__.strip('\n ') :
            raise TypeError('类%s没有注释'%name)
        super(Mymeta,self).__init__(name,bases,dict)


class People(object,metaclass=Mymeta):   # People = Mymeta("People",(object,),{....})
    '''
    aaa
    '''
    def __init__(self,name,age):
        self.name = name
        self.age = age

    def eat(self):
        print('%s is eating'%self.name)

